home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1991 …esperately Seeking Seven / Desperately Seeking Seven.2mg / Dev.CD.8 / Essentials / Tools / DTS.Samples / SC02BusyBox / BusyBox.p / Busy.p next >
Encoding:
Text File  |  1990-05-25  |  1.8 KB  |  76 lines  |  [04] ASCII Text (0x0000)

  1. {**********************************************************************
  2. {*
  3. {* BusyBox -- Version 3.0  (Main Program)
  4. {*
  5. {* Copyright (c)
  6. {* Apple Computer, Inc.  1986-1989
  7. {* All Rights Reserved.
  8. {*
  9. {* Developer Technical Support Apple II Sample Code
  10. {*
  11. {* This file contains the busybox program.
  12. {*
  13. {**********************************************************************}
  14. {$R-}
  15.  
  16. program BusyBox;
  17.  
  18. USES 
  19.         types,
  20.         gsos,
  21.         Quickdraw,
  22.         fonts,
  23.         memory,
  24.         IntMath,
  25.         events,
  26.         prodos,
  27.         locator,
  28.         controls,
  29.         windows,
  30.         lists,
  31.         scrap,
  32.         lineedit,
  33.         dialogs,
  34.         menus,
  35.         desk,
  36.         STDFile,
  37.         QDAUX, 
  38.         print,
  39.         miscTool,
  40.         resources,
  41.         
  42.  
  43.         uGlobals,  { HodgePodge Code Units }
  44.         uUtils,
  45.         uWindow,
  46.         uMenu,
  47.         uEvent;
  48.  
  49. var
  50.     InitRef : ref;      { This holds the reference to the startstop record }
  51.  
  52.  
  53. BEGIN  { of MAIN program BusyBox }
  54.  
  55.     { Init our globals. }
  56.     InitGlobals;
  57.  
  58.     MyMemoryID := MMStartup;            { Start up & get ID from the Memory Manager }
  59.     TLStartUp;                          { Start up the tool locator }
  60.  
  61.                                         { Startup the tools using the new toolbox call }
  62.     InitRef := StartupTools(MyMemoryID,RefIsResource,ref(1));
  63.     if _toolErr = 0 then    { note: usage of _toolErr may vary between compilers }
  64.         begin
  65.             SetUpMenus;     { Set up menus }
  66.             SetupWindows;
  67.             InitCursor;     { Make cursor show ready }
  68.             MainEvent;      { Use application }
  69.         end;
  70.  
  71.     { Let the toolbox shutdown the tools. }
  72.     ShutDownTools(RefIsHandle,InitRef);
  73.     TLShutDown;             { Shut down the tool locator }
  74.  
  75. END.   { of MAIN program BusyBox }
  76.